package com.roger.springcloudGreenwich.api;



import com.roger.springcloudGreenwich.component.UserHelper;
import io.swagger.annotations.Api;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;


/**
 * Created by Roger on 2019/10/21.
 * 用户controller层
 */
@RestController
@Slf4j
@RequestMapping("/api/users")
@Api(tags = "用户相关接口", description = "提供用户相关的 Rest API")
public class UsersController {

    @Autowired
    private UserHelper userHelper;

    @GetMapping(value = "/test")
    public String index(HttpServletRequest request) throws Exception{
        System.out.println(userHelper.getCurrentUser(request));
        return "index";
    }



}
